import request from '@/utils/request'

export default ({
  // 获取全部识别图
  getAllSbt() {
    return request({
      url: `/serviceucenter/easyar/getAllEasyAr`,
      method: 'get'
    }).then(res => res.data.list)
  },
  // 删除识别图
  deleteSbt(id, esayId) {

    return Promise.all([
      request({
        url: `/serviceucenter/easyar/deleteEasyAr/${id}`,
        method: 'delete'
      })
      ,
      request({
        url: `../easyarservice/shibietu/delete/${esayId}`,
        method: 'delete'
      })
    ])



    // const resarr = []
    // resarr[0] = request({
    //   url: `/serviceucenter/easyar/deleteEasyAr/${id}`,
    //   method: 'delete'
    // })
    // resarr[1] = request({
    //   url: `/easyarservice/shibietu/delete?id=${esayId}`,
    //   method: 'delete'
    // })
    // return Promise.all(resarr)
  },
  // 新增识别图
  addSbt(data) {
    return request({
      url: `/serviceucenter/easyar/addEasyAr`,
      method: 'post',
      data
    })
  }

})
